package cn.vivi.payment.service.impl;

import cn.vivi.commons.entity.Payment;
import cn.vivi.payment.mapper.PaymentMapper;
import cn.vivi.payment.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PaymentServiceImpl implements PaymentService {

    @Autowired
    private PaymentMapper paymentMapper;

    @Override
    public List<Payment> findAll() {
        return paymentMapper.selectList(null);
    }

    @Override
    public boolean insert(Payment payment) {
        return paymentMapper.insert(payment) > 0;
    }

    @Override
    public Payment findOne(String id) {
        return paymentMapper.selectById(id);
    }

}
